home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 1 / PC Actual CD 01.iso / share / dos / graficos / plydat14.arj / TEXTURE.INC < prev    next >
Encoding:
Text File  |  1992-03-22  |  3.8 KB  |  159 lines

  1. // Names of the various shading flags
  2. define shadow_check       1
  3. define reflect_check      2
  4. define transmit_check     4
  5. define two_sided_surface  8
  6. define cast_shadows      16
  7.  
  8. // Useful definitions to use with noise surfaces.  These
  9. // will come in handy below when we declare marble and
  10. // wood textures.
  11. define position_plain       0
  12. define position_objectx     1
  13. define position_worldx      2
  14. define position_cylindrical 3
  15. define position_fmodx       4
  16. define position_fmodxy      5
  17. define position_fmodxyz     6
  18.  
  19. define lookup_plain    0
  20. define lookup_sawtooth 1
  21. define lookup_cos      2
  22. define lookup_sin      3
  23.  
  24. define plain_normal  0
  25. define bump_normal   1
  26. define ripple_normal 2
  27. define dented_normal 3
  28.  
  29. define blue_ripple
  30. texture {
  31.    noise surface {
  32.       color <0.4, 0.4, 1.0>
  33.       normal 2
  34.       frequency 100
  35.       bump_scale 2
  36.       ambient 0.3
  37.       diffuse 0.4
  38.       specular white, 0.7
  39.       reflection 0.5
  40.       microfacet Reitz 10
  41.       }
  42.    scale <10, 1, 10>
  43.    }
  44.  
  45. // The standard sort of marble texture
  46. define white_marble
  47. texture {
  48.    noise surface {
  49.       color white
  50.       position_fn position_objectx
  51.       lookup_fn lookup_sawtooth
  52.       octaves 3
  53.       turbulence 3
  54.       ambient 0.3
  55.       diffuse 0.8
  56.       specular 0.3
  57.       microfacet Reitz 5
  58.       color_map(
  59.          [0.0, 0.8, <1, 1, 1>, <0.6, 0.6, 0.6>]
  60.          [0.8, 1.0, <0.6, 0.6, 0.6>, <0.1, 0.1, 0.1>])
  61.       }
  62.    }
  63.  
  64. // Nice blue agate texture
  65. define sapphire_agate
  66. texture {
  67.    noise surface {
  68.       ambient 0.5
  69.       diffuse 0.7
  70.       position_fn position_objectx
  71.       position_scale 1.1
  72.       lookup_fn lookup_sawtooth
  73.       octaves 3
  74.       turbulence 2
  75.       color_map(
  76.          [0.0, 0.3, <0, 0, 0.9>, <0, 0, 0.8>]
  77.          [0.3, 1,   <0, 0, 0.8>, <0, 0, 0.4>])
  78.       }
  79.    scale <0.5, 0.5, 0.5>
  80.    }
  81.  
  82. // Simple color map texture
  83. define whorl_texture
  84. texture {
  85.    noise surface {
  86.       color green
  87.       ambient 0.3
  88.       diffuse 0.8
  89.       lookup_fn lookup_sawtooth
  90.       octaves 2
  91.       turbulence 2
  92.       color_map(
  93.          [0.0, 0.3, green,   blue]
  94.          [0.3, 0.6, blue,    skyblue]
  95.          [0.6, 0.8, skyblue, orange]
  96.          [0.8, 1.0, orange,  red])
  97.       }
  98.    scale <0.5, 0.5, 0.5>
  99.    }
  100.  
  101. // Create a wood texture.  Concentric rings of color
  102. // are wrapped around the z-axis.  There is some turbulence
  103. // in order to keep the rings from looking too perfect.
  104. define light_wood <0.6, 0.24, 0.1>
  105. define median_wood <0.3, 0.12, 0.03>
  106. define dark_wood <0.05, 0.01, 0.005>
  107. define wooden
  108. texture {
  109.    noise surface {
  110.       position_fn position_cylindrical
  111.       position_scale 1
  112.       lookup_fn lookup_sawtooth
  113.       octaves 1
  114.       turbulence 1
  115.       ambient 0.2
  116.       diffuse 0.7
  117.       specular white, 0.5
  118.       microfacet Reitz 10
  119.       color_map(
  120.          [0.0, 0.2, light_wood, light_wood]
  121.          [0.2, 0.3, light_wood, median_wood]
  122.          [0.3, 0.4, median_wood, light_wood]
  123.          [0.4, 0.7, light_wood, light_wood]
  124.          [0.7, 0.8, light_wood, median_wood]
  125.          [0.8, 0.9, median_wood, light_wood]
  126.          [0.9, 1.0, light_wood, dark_wood])
  127.       }
  128.    }
  129.  
  130. // Define a texture using a color wheel
  131. define xz_wheel_texture
  132. texture {
  133.    special surface {
  134.       color color_wheel(x, y, z)
  135.       ambient 0.2
  136.       diffuse 0.8
  137.       specular white, 0.2
  138.       microfacet Reitz 10
  139.       }
  140.    }
  141.  
  142. // This is an example of a gradient texture.
  143. define mountain_colors
  144. texture {
  145.    noise surface {
  146.       ambient 0.2
  147.       diffuse 0.8
  148.       specular 0.2
  149.       position_fn position_objectx
  150.       color_map(
  151.          [-128,   0, blue,  blue]
  152.          [   0,  20, green, green]
  153.          [  20,  40, green, tan]
  154.          [  40,  90, tan,   tan]
  155.          [  90, 128, white, white])
  156.       }
  157.    rotate <0, 0, 90>
  158.    }
  159.